#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
void reverse_string(char* arr,int left,int right)
{
	if (left < right)
	{
		int b = 0;
		b = arr[left];
		arr[left] = arr[right];
		arr[right] = b;
		reverse_string(arr, left + 1, right - 1);
	}
}

int main()
{
	char arr[10000] = { 0 };
	while (gets(arr))
	{
		int left = 0;
		int right = 0;
		int sz = sizeof(arr) / sizeof(arr[0]);
		reverse_string(arr, 0, sz - 2);
		printf(arr);
	}
	return 0;
}